# -*- coding: utf-8 -*-
'''
@author: Hugo
@file: tasks.py
@time: 2021/12/4 10:31
'''

from django.core.mail import send_mail
from celery_tasks.main import app


# 任务
@app.task
def celery_send_email(subject, message, from_email, recipient_list, html_message):
    print('调用邮件发送函数...')
    send_mail(
        subject=subject,
        message=message,
        from_email=from_email,
        recipient_list=recipient_list,
        html_message=html_message
    )
    print('邮件发送函数调用成功...')
